<template>
  <div></div>
</template>
<script setup>
import { useRoute, useRouter } from 'vue-router'
import { onMounted } from 'vue'

const route = useRoute()
const router = useRouter()

onMounted(() => {
  const { params, query } = route
  // 还原真实路径
  const realPath = '/' + (params.path ? params.path : '')
  router.replace({ path: realPath, query })
})
</script> 